home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / Make / source / configure.in < prev    next >
Encoding:
Text File  |  1997-09-19  |  3.6 KB  |  125 lines

  1. dnl Process this file with autoconf to produce a configure script.
  2. AC_REVISION([$Id: configure.in,v 1.58 1997/09/16 14:17:28 psmith Exp $])
  3. AC_PREREQ(2.12)dnl        dnl Minimum Autoconf version required.
  4. AC_INIT(vpath.c)dnl        dnl A distinctive file to look for in srcdir.
  5.  
  6. AM_INIT_AUTOMAKE(make, 3.76.1)
  7. AM_CONFIG_HEADER(config.h)
  8. AC_CONFIG_SUBDIRS(glob)
  9.  
  10. AM_CONDITIONAL(MAINT_MAKEFILE, test -r $srcdir/maintMakefile)
  11.  
  12. dnl Regular configure stuff
  13.  
  14. AC_PROG_MAKE_SET
  15. AC_PROG_CC
  16. AC_PROG_INSTALL
  17. AC_PROG_CPP            dnl Later checks need this.
  18. AC_ARG_PROGRAM
  19. AC_AIX
  20. AC_ISC_POSIX
  21. AC_MINIX
  22. AC_HEADER_STDC
  23. AC_HEADER_DIRENT
  24. AC_TYPE_UID_T            dnl Also does gid_t.
  25. AC_TYPE_PID_T
  26. AC_TYPE_SIGNAL
  27. AC_CHECK_HEADERS(unistd.h limits.h sys/param.h fcntl.h string.h memory.h \
  28.              sys/timeb.h)
  29. AC_PROG_CC_C_O
  30. AC_C_CONST            dnl getopt needs this.
  31. AC_HEADER_STAT
  32.  
  33. AC_SUBST(LIBOBJS)
  34.  
  35. AC_DEFUN(AC_CHECK_SYMBOL, [dnl
  36. AC_MSG_CHECKING(for $1)
  37. AC_CACHE_VAL(ac_cv_check_symbol_$1, [dnl
  38. AC_TRY_LINK(, [extern char *sys_siglist[]; puts(*sys_siglist);],
  39.         ac_cv_check_symbol_$1=yes, ac_cv_check_symbol_$1=no)])
  40. if test "$ac_cv_check_symbol_$1" = yes; then
  41. changequote(,)dnl
  42.   ac_tr_symbol=`echo $1 | tr '[a-z]' '[A-Z]'`
  43. changequote([,])dnl
  44.   AC_DEFINE_UNQUOTED(HAVE_${ac_tr_symbol})
  45. fi
  46. AC_MSG_RESULT($ac_cv_check_symbol_$1)])dnl
  47.  
  48. AC_CHECK_FUNCS(memmove psignal mktemp pstat_getdynamic \
  49.            dup2 getcwd sigsetmask getgroups setlinebuf \
  50.            seteuid setegid setreuid setregid strerror strsignal)
  51. AC_CHECK_SYMBOL(sys_siglist)
  52. AC_FUNC_ALLOCA
  53. AC_FUNC_VFORK
  54. AC_FUNC_SETVBUF_REVERSED
  55. AC_FUNC_GETLOADAVG
  56. AC_CHECK_LIB(kstat, kstat_open)
  57. AC_FUNC_STRCOLL
  58.  
  59. # Check out the wait reality.
  60. AC_CHECK_HEADERS(sys/wait.h) AC_CHECK_FUNCS(waitpid wait3)
  61. AC_MSG_CHECKING(for union wait)
  62. AC_CACHE_VAL(make_cv_union_wait, [dnl
  63. AC_TRY_LINK([#include <sys/types.h>
  64. #include <sys/wait.h>],
  65.         [union wait status; int pid; pid = wait (&status);
  66. #ifdef WEXITSTATUS
  67. /* Some POSIXoid systems have both the new-style macros and the old
  68.    union wait type, and they do not work together.  If union wait
  69.    conflicts with WEXITSTATUS et al, we don't want to use it at all.  */
  70. if (WEXITSTATUS (status) != 0) pid = -1;
  71. #ifdef WTERMSIG
  72. /* If we have WEXITSTATUS and WTERMSIG, just use them on ints.  */
  73. -- blow chunks here --
  74. #endif
  75. #endif
  76. #ifdef HAVE_WAITPID
  77. /* Make sure union wait works with waitpid.  */
  78. pid = waitpid (-1, &status, 0);
  79. #endif
  80. ],
  81.         [make_cv_union_wait=yes], [make_cv_union_wait=no])])
  82. if test "$make_cv_union_wait" = yes; then
  83.   AC_DEFINE(HAVE_UNION_WAIT)
  84. fi
  85. AC_MSG_RESULT($make_cv_union_wait)
  86.  
  87. AC_DECL_SYS_SIGLIST
  88.  
  89. # The presence of the following is not meant to imply
  90. # that make necessarily works on those systems.
  91. AC_CHECK_LIB(sun, getpwnam)
  92.  
  93. AC_SUBST(REMOTE) REMOTE=stub
  94. AC_ARG_WITH(customs, [export jobs with the Customs daemon (NOT SUPPORTED)],
  95. [REMOTE=cstms LIBS="$LIBS libcustoms.a"])
  96.  
  97. echo checking for location of SCCS get command
  98. if test -f /usr/sccs/get; then
  99.   SCCS_GET=/usr/sccs/get
  100.   AC_DEFINE(SCCS_GET, "/usr/sccs/get")
  101. else
  102.   SCCS_GET=get
  103.   AC_DEFINE(SCCS_GET, "get")
  104. fi
  105. ac_clean_files="$ac_clean_files s.conftest conftoast" # Remove these later.
  106. if ( /usr/sccs/admin -n s.conftest || admin -n s.conftest ) >/dev/null 2>&1 &&
  107.    test -f s.conftest; then
  108.   # We successfully created an SCCS file.
  109.   echo checking if SCCS get command understands -G
  110.   if $SCCS_GET -Gconftoast s.conftest >/dev/null 2>&1 &&
  111.      test -f conftoast; then
  112.     AC_DEFINE(SCCS_GET_MINUS_G)
  113.   fi
  114. fi
  115. rm -f s.conftest conftoast
  116.  
  117. AC_OUTPUT(Makefile build.sh)
  118.  
  119. dnl Local Variables:
  120. dnl comment-start: "dnl "
  121. dnl comment-end: ""
  122. dnl comment-start-skip: "\\bdnl\\b\\s *"
  123. dnl compile-command: "make configure config.h.in"
  124. dnl End:
  125.